<%@ Page Language="C#" MasterPageFile="~/MasterPages/Learning.Master" AutoEventWireup="true" CodeBehind="Deployment.aspx.cs" Inherits="Mindscape.BackgroundMotion.Website.Learn.Deployment" Title="Setup: Deploying BackgroundMotion" %>
<asp:Content ID="Content3" ContentPlaceHolderID="BodyContent" runat="server">

<h2>Database Setup</h2>

<p>
    The database can be automatically provisioned by the deployment batch file in the Database project (<b>build.cmd</b>)<br />
    <br />
    The command file takes two arguments, the database server name to connect to and the database to populate. If we wanted to connect to the server called <b>BackgroundMotion</b> and populate the database called <b>BackgroundMotionDB</b> we would call the command as shown below;<br />
    <br />
    <img src="/Images/Dev/DatabaseBuild.jpg" /><br />
    <br />
</p>

<h2>Web Server (IIS)</h2>

<p>
    BackgroundMotion has been developed and tested under IIS versions 5.1, 6.0 and 7.0.<br />
    To host <b>BackgroundMotion</b> using Microsoft Internet Information Services (IIS), create a new website and set the the home directory to point to <b>Trunk\Src\Clients\Website</b> in the directory in which the source code resides.<br /><br />
    Enable the following settings on the website to complete the installation:<br />
</p>
<ul>
    <li>ASP.NET 2.0 must be selected</li>
    <li>Allow anonymous access</li>
    <li>The extension <b>.svc</b> should be mapped to the ASP.NET ISAPI filter</li>
</ul>
<p>
    <b>Note:</b> You dont not need to host the site under IIS if you only want to run the solution in a development mode. You can use the integrated web server to run the solution.
</p>

<h2>Web Configuration</h2>

<p>
    To configure the solution, update the following configuration entries in the web.config file.
</p>

<div style="font-family: Consolas, Verdana; font-size: 11pt; color: black; background: white;">
    <p style="margin: 0px;"><span style="color: blue;">&nbsp; &lt;</span><span style="color: maroon;">smtpMailSender</span><span style="color: blue;">&gt;</span></p>
    <p style="margin: 0px;"><span style="color: blue;">&nbsp; &nbsp; &lt;</span><span style="color: maroon;">Host</span><span style="color: blue;">&gt;</span>[outbound mail server]<span style="color: blue;">&lt;/</span><span style="color: maroon;">Host</span><span style="color: blue;">&gt;</span></p>
    <p style="margin: 0px;"><span style="color: blue;">&nbsp; &nbsp; &lt;</span><span style="color: maroon;">RecipientAddress</span><span style="color: blue;">&gt;</span>[recipient for email]<span style="color: blue;">&lt;/</span><span style="color: maroon;">RecipientAddress</span><span style="color: blue;">&gt;</span></p>
    <p style="margin: 0px;"><span style="color: blue;">&nbsp; &lt;/</span><span style="color: maroon;">smtpMailSender</span><span style="color: blue;">&gt;</span></p>
</div>

<br />

<p>    
  The connection string to the database can be configured in the <b>ConnectionStrings</b> section:
</p>

<div style="font-family: Consolas; font-size: 11pt; color: black; background: white;">
    <p style="margin: 0px;"><span style="color: blue;">&nbsp; &lt;</span><span style="color: maroon;">connectionStrings</span><span style="color: blue;">&gt;</span></p>
    <p style="margin: 0px;"><span style="color: blue;">&nbsp; &nbsp; &lt;</span><span style="color: maroon;">add</span><span style="color: blue;"> </span><span style="color: red;">name</span><span style="color: blue;">=</span>"<span style="color: blue;">BackgroundMotionDB</span>"<span style="color: blue;"> </span>
        <br /><span style="color: red;">&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;providerName</span><span style="color: blue;">=</span>"<span style="color: blue;">System.Data.SqlClient</span>"<span style="color: blue;"> </span>
        <br /><span style="color: red;">&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;connectionString</span><span style="color: blue;">=</span>"<span style="color: blue;">[connection string]</span>"<span style="color: blue;">/&gt;</span></p>
    <p style="margin: 0px;"><span style="color: blue;">&nbsp; &lt;/</span><span style="color: maroon;">connectionStrings</span><span style="color: blue;">&gt;</span></p>
</div>

<br />

</asp:Content>
